package mylooks.greenteam.Registration;

import java.sql.Date;

import mylooks.greenteam.R;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.ImageView;

public class FragmentBirthdate extends Fragment 
{
	DatePicker dpBirthDate;
	// onCreate
	@Override
	public void onCreate(Bundle savedInstanceState) 
	{
		super.onCreate(savedInstanceState);
	}

	// onActivityCreated
	@Override
	public void onActivityCreated(Bundle savedInstanceState) 
	{
		super.onActivityCreated(savedInstanceState);
	}

	// onCreateView
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) 
	{
		View layoutView = inflater.inflate(R.layout.registration_insert_birthdate, container, false);
		dpBirthDate = (DatePicker)layoutView.findViewById(R.id.datePickerBirthDate);
			
		return layoutView;
	}	
	
	public Date GetBirthDate()
	{
		Date d=new Date(dpBirthDate.getYear(), dpBirthDate.getMonth(), dpBirthDate.getDayOfMonth());
		return d;
	}	
}
